package com.yuneec.droneservice.parse;

/**
 * Created by jw.gu on 2016/8/12.
 */
public class Wifi {
    public String bssid;
    public String frequency;
    public String level;
    public String flags;
    public String ssid;
    public String ip;

    public Wifi() {
    }

    public Wifi(String resource) {
        String[] split = resource.split(" ");
        if (split.length > 0) {
            bssid = split[0];
        }
        if (split.length > 1) {
            frequency = split[1];
        }
        if (split.length > 2) {
            level = split[2];
        }
        if (split.length > 3) {
            flags = split[3];
        }
        if (split.length > 4) {
            ssid = split[4];
        }
    }

    @Override
    public String toString() {
        return "Wifi{" +
                "bssid='" + bssid + '\'' +
                ", frequency='" + frequency + '\'' +
                ", level='" + level + '\'' +
                ", flags='" + flags + '\'' +
                ", ssid='" + ssid + '\'' +
                ", ip='" + ip + '\'' +
                '}';
    }
}
